<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>利用边框制作三角形</title>
    <style>
        .div1 {
            width: 0px;
            height: 0px;
            /* transparent是透明色 */
            border: 20px solid transparent;
            border-top-color: chartreuse;
        }
    </style>
</head>

<body>

</body>
<div class="div1"></div>

</html>